/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package ar.uba.fi.rsajapplet.view;

import java.awt.event.ActionListener;

/**
 *
 * @author marcelo
 */
public class LearningPanel extends javax.swing.JPanel {

    /**
     * Creates new form LearningPanel
     */
    public LearningPanel(ActionListener modeActionListener) {
        initComponents();
        this.modeButton.addActionListener(modeActionListener);
    }

    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jLabel2 = new javax.swing.JLabel();
        jTabbedPane1 = new javax.swing.JTabbedPane();
        titlePanel = new javax.swing.JPanel();
        titleLabel = new javax.swing.JLabel();
        tabbedPane = new javax.swing.JTabbedPane();
        generateKeysTab = new javax.swing.JPanel();
        startButton = new javax.swing.JButton();
        modeButton = new javax.swing.JButton();
        previousButton = new javax.swing.JButton();
        nextButton = new javax.swing.JButton();
        endButton = new javax.swing.JButton();
        lineSeparator = new javax.swing.JSeparator();
        progressPanel = new javax.swing.JPanel();
        pLabel = new javax.swing.JLabel();
        pValue = new javax.swing.JLabel();
        nLabel = new javax.swing.JLabel();
        nValue = new javax.swing.JLabel();
        dLabel = new javax.swing.JLabel();
        dValue = new javax.swing.JLabel();
        qLabel = new javax.swing.JLabel();
        qValue = new javax.swing.JLabel();
        phiLabel = new javax.swing.JLabel();
        phiValue = new javax.swing.JLabel();
        eLabel = new javax.swing.JLabel();
        eValue = new javax.swing.JLabel();
        cards = new javax.swing.JPanel();
        stepDescriptionPanel = new javax.swing.JPanel();
        coprimeButton = new javax.swing.JButton();
        fromASCIIButton = new javax.swing.JButton();
        primeButton = new javax.swing.JButton();
        toASCIIButton = new javax.swing.JButton();
        resultTextField = new javax.swing.JTextField();
        multiplicativeInverseButton = new javax.swing.JButton();
        modButton = new javax.swing.JButton();
        expButton = new javax.swing.JButton();
        equalsButton = new javax.swing.JButton();
        multiplyButton = new javax.swing.JButton();
        divideButton = new javax.swing.JButton();
        plusButton = new javax.swing.JButton();
        minusButton = new javax.swing.JButton();
        stepOperationPanel = new javax.swing.JPanel();
        stepOperationValue = new javax.swing.JTextField();
        stepOperationLabel = new javax.swing.JLabel();
        errorMessageIcon = new javax.swing.JLabel();
        encryptTab = new javax.swing.JPanel();
        lineSeparator1 = new javax.swing.JSeparator();
        encryptProgressPanel = new javax.swing.JPanel();
        messageLabel = new javax.swing.JLabel();
        messageValue = new javax.swing.JLabel();
        numericalRepresentationLabel = new javax.swing.JLabel();
        numericalRepresentationValue = new javax.swing.JLabel();
        publicKeyLabel = new javax.swing.JLabel();
        publicKeyValue = new javax.swing.JLabel();
        cryptogramLabel = new javax.swing.JLabel();
        cryptogramValue = new javax.swing.JLabel();
        configurationPanel = new javax.swing.JPanel();
        publicKeyLabel2 = new javax.swing.JLabel();
        eLabel1 = new javax.swing.JLabel();
        eValue1 = new javax.swing.JTextField();
        nLabel1 = new javax.swing.JLabel();
        nValue1 = new javax.swing.JTextField();
        messageLabel2 = new javax.swing.JLabel();
        messageValue2 = new javax.swing.JTextField();
        useKeyButton1 = new javax.swing.JButton();
        useMessageButton = new javax.swing.JButton();
        buttonsPanel = new javax.swing.JPanel();
        modeButton1 = new javax.swing.JButton();
        startButton1 = new javax.swing.JButton();
        previousButton1 = new javax.swing.JButton();
        nextButton1 = new javax.swing.JButton();
        endButton1 = new javax.swing.JButton();
        decryptTab = new javax.swing.JPanel();
        decryptProgressPanel = new javax.swing.JPanel();
        cLabel = new javax.swing.JLabel();
        cValue = new javax.swing.JLabel();
        privateKeyLabel = new javax.swing.JLabel();
        privateKeyValue = new javax.swing.JLabel();
        nRLabel = new javax.swing.JLabel();
        nRValue = new javax.swing.JLabel();
        mLabel = new javax.swing.JLabel();
        mValue = new javax.swing.JLabel();
        jScrollPane1 = new javax.swing.JScrollPane();
        encryptProgressPanel1 = new javax.swing.JPanel();
        messageLabel1 = new javax.swing.JLabel();
        messageValue1 = new javax.swing.JLabel();
        numericalRepresentationLabel1 = new javax.swing.JLabel();
        numericalRepresentationValue1 = new javax.swing.JLabel();
        publicKeyLabel1 = new javax.swing.JLabel();
        publicKeyValue1 = new javax.swing.JLabel();
        cryptogramLabel1 = new javax.swing.JLabel();
        cryptogramValue1 = new javax.swing.JLabel();
        jTabbedPane2 = new javax.swing.JTabbedPane();

        jLabel2.setText("jLabel2");

        titleLabel.setFont(new java.awt.Font("Ubuntu", 1, 18)); // NOI18N
        titleLabel.setText("Algoritmo RSA - Modo Aprendizaje");

        javax.swing.GroupLayout titlePanelLayout = new javax.swing.GroupLayout(titlePanel);
        titlePanel.setLayout(titlePanelLayout);
        titlePanelLayout.setHorizontalGroup(
            titlePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(titlePanelLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(titleLabel)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        titlePanelLayout.setVerticalGroup(
            titlePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(titlePanelLayout.createSequentialGroup()
                .addComponent(titleLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 17, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(0, 12, Short.MAX_VALUE))
        );

        startButton.setText("Inicio");
        startButton.setPreferredSize(new java.awt.Dimension(100, 30));

        modeButton.setText("Modo");
        modeButton.setPreferredSize(new java.awt.Dimension(90, 30));

        previousButton.setText("Anterior");
        previousButton.setPreferredSize(new java.awt.Dimension(100, 30));
        previousButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                previousButtonActionPerformed(evt);
            }
        });

        nextButton.setText("Siguiente");
        nextButton.setMaximumSize(new java.awt.Dimension(100, 30));
        nextButton.setMinimumSize(new java.awt.Dimension(100, 30));
        nextButton.setPreferredSize(new java.awt.Dimension(100, 30));

        endButton.setText("Fin");
        endButton.setMaximumSize(new java.awt.Dimension(90, 30));
        endButton.setMinimumSize(new java.awt.Dimension(90, 30));
        endButton.setPreferredSize(new java.awt.Dimension(100, 30));
        endButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                endButtonActionPerformed(evt);
            }
        });

        progressPanel.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Progreso", javax.swing.border.TitledBorder.LEFT, javax.swing.border.TitledBorder.DEFAULT_POSITION));
        progressPanel.setToolTipText("");

        pLabel.setFont(new java.awt.Font("Ubuntu", 1, 15)); // NOI18N
        pLabel.setText("p:");

        pValue.setText("3");

        nLabel.setFont(new java.awt.Font("Ubuntu", 1, 15)); // NOI18N
        nLabel.setText("n:");

        nValue.setText("111");

        dLabel.setFont(new java.awt.Font("Ubuntu", 1, 15)); // NOI18N
        dLabel.setText("d:");

        dValue.setText("29");

        qLabel.setFont(new java.awt.Font("Ubuntu", 1, 15)); // NOI18N
        qLabel.setText("q:");

        qValue.setText("37");

        phiLabel.setFont(new java.awt.Font("Ubuntu", 1, 15)); // NOI18N
        phiLabel.setText("phi:");

        phiValue.setText("72");

        eLabel.setFont(new java.awt.Font("Ubuntu", 1, 15)); // NOI18N
        eLabel.setText("e:");

        eValue.setText("5");

        javax.swing.GroupLayout progressPanelLayout = new javax.swing.GroupLayout(progressPanel);
        progressPanel.setLayout(progressPanelLayout);
        progressPanelLayout.setHorizontalGroup(
            progressPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(progressPanelLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(progressPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(progressPanelLayout.createSequentialGroup()
                        .addComponent(pLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 28, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(pValue, javax.swing.GroupLayout.PREFERRED_SIZE, 96, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(progressPanelLayout.createSequentialGroup()
                        .addComponent(qLabel)
                        .addGap(18, 18, 18)
                        .addComponent(qValue)))
                .addGap(71, 71, 71)
                .addGroup(progressPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(phiLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(nLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addGap(18, 18, 18)
                .addGroup(progressPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(nValue)
                    .addComponent(phiValue))
                .addGap(130, 130, 130)
                .addGroup(progressPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(progressPanelLayout.createSequentialGroup()
                        .addComponent(dLabel)
                        .addGap(18, 18, 18)
                        .addComponent(dValue))
                    .addGroup(progressPanelLayout.createSequentialGroup()
                        .addComponent(eLabel)
                        .addGap(18, 18, 18)
                        .addComponent(eValue)))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        progressPanelLayout.setVerticalGroup(
            progressPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(progressPanelLayout.createSequentialGroup()
                .addGroup(progressPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(pLabel)
                    .addComponent(pValue)
                    .addComponent(nLabel)
                    .addComponent(nValue)
                    .addComponent(dLabel)
                    .addComponent(dValue))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(progressPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(qLabel)
                    .addComponent(qValue)
                    .addComponent(phiLabel)
                    .addComponent(phiValue)
                    .addComponent(eLabel)
                    .addComponent(eValue))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        cards.setPreferredSize(new java.awt.Dimension(670, 165));

        coprimeButton.setFont(new java.awt.Font("Ubuntu", 0, 10)); // NOI18N
        coprimeButton.setText("Coprimo");
        coprimeButton.setMaximumSize(new java.awt.Dimension(18, 20));
        coprimeButton.setMinimumSize(new java.awt.Dimension(18, 20));
        coprimeButton.setPreferredSize(new java.awt.Dimension(18, 20));

        fromASCIIButton.setFont(new java.awt.Font("Ubuntu", 0, 10)); // NOI18N
        fromASCIIButton.setText("de ASCII");
        fromASCIIButton.setMaximumSize(new java.awt.Dimension(18, 20));
        fromASCIIButton.setMinimumSize(new java.awt.Dimension(18, 20));
        fromASCIIButton.setPreferredSize(new java.awt.Dimension(18, 20));

        primeButton.setFont(new java.awt.Font("Ubuntu", 0, 10)); // NOI18N
        primeButton.setText("Primo");
        primeButton.setMaximumSize(new java.awt.Dimension(18, 20));
        primeButton.setMinimumSize(new java.awt.Dimension(18, 20));
        primeButton.setPreferredSize(new java.awt.Dimension(18, 20));

        toASCIIButton.setFont(new java.awt.Font("Ubuntu", 0, 10)); // NOI18N
        toASCIIButton.setText("a ASCII");
        toASCIIButton.setMaximumSize(new java.awt.Dimension(18, 20));
        toASCIIButton.setMinimumSize(new java.awt.Dimension(18, 20));
        toASCIIButton.setPreferredSize(new java.awt.Dimension(18, 20));

        resultTextField.setMaximumSize(new java.awt.Dimension(16, 26));

        multiplicativeInverseButton.setFont(new java.awt.Font("Ubuntu", 0, 10)); // NOI18N
        multiplicativeInverseButton.setText("Inv Mult");
        multiplicativeInverseButton.setMaximumSize(new java.awt.Dimension(18, 20));
        multiplicativeInverseButton.setMinimumSize(new java.awt.Dimension(18, 20));
        multiplicativeInverseButton.setPreferredSize(new java.awt.Dimension(18, 20));

        modButton.setFont(new java.awt.Font("Ubuntu", 0, 10)); // NOI18N
        modButton.setText("Mod");
        modButton.setMaximumSize(new java.awt.Dimension(18, 20));
        modButton.setMinimumSize(new java.awt.Dimension(18, 20));
        modButton.setPreferredSize(new java.awt.Dimension(18, 20));

        expButton.setFont(new java.awt.Font("Ubuntu", 0, 10)); // NOI18N
        expButton.setText("exp");
        expButton.setMaximumSize(new java.awt.Dimension(18, 20));
        expButton.setMinimumSize(new java.awt.Dimension(18, 20));
        expButton.setPreferredSize(new java.awt.Dimension(18, 20));

        equalsButton.setFont(new java.awt.Font("Ubuntu", 0, 10)); // NOI18N
        equalsButton.setText("=");
        equalsButton.setMaximumSize(new java.awt.Dimension(18, 20));
        equalsButton.setMinimumSize(new java.awt.Dimension(18, 20));
        equalsButton.setPreferredSize(new java.awt.Dimension(18, 20));

        multiplyButton.setFont(new java.awt.Font("Ubuntu", 0, 10)); // NOI18N
        multiplyButton.setText("*");
        multiplyButton.setMaximumSize(new java.awt.Dimension(18, 20));
        multiplyButton.setMinimumSize(new java.awt.Dimension(18, 20));
        multiplyButton.setPreferredSize(new java.awt.Dimension(18, 20));

        divideButton.setFont(new java.awt.Font("Ubuntu", 0, 10)); // NOI18N
        divideButton.setText("/");
        divideButton.setMaximumSize(new java.awt.Dimension(18, 20));
        divideButton.setMinimumSize(new java.awt.Dimension(18, 20));
        divideButton.setPreferredSize(new java.awt.Dimension(18, 20));

        plusButton.setFont(new java.awt.Font("Ubuntu", 0, 10)); // NOI18N
        plusButton.setText("+");
        plusButton.setMaximumSize(new java.awt.Dimension(18, 20));
        plusButton.setMinimumSize(new java.awt.Dimension(18, 20));
        plusButton.setPreferredSize(new java.awt.Dimension(18, 20));

        minusButton.setFont(new java.awt.Font("Ubuntu", 0, 10)); // NOI18N
        minusButton.setText("-");
        minusButton.setMaximumSize(new java.awt.Dimension(18, 20));
        minusButton.setMinimumSize(new java.awt.Dimension(18, 20));
        minusButton.setPreferredSize(new java.awt.Dimension(18, 20));

        javax.swing.GroupLayout stepDescriptionPanelLayout = new javax.swing.GroupLayout(stepDescriptionPanel);
        stepDescriptionPanel.setLayout(stepDescriptionPanelLayout);
        stepDescriptionPanelLayout.setHorizontalGroup(
            stepDescriptionPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(stepDescriptionPanelLayout.createSequentialGroup()
                .addGap(61, 61, 61)
                .addGroup(stepDescriptionPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(resultTextField, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addGroup(stepDescriptionPanelLayout.createSequentialGroup()
                        .addGroup(stepDescriptionPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(multiplyButton, javax.swing.GroupLayout.DEFAULT_SIZE, 222, Short.MAX_VALUE)
                            .addComponent(divideButton, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(plusButton, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(minusButton, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(stepDescriptionPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                            .addComponent(coprimeButton, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(fromASCIIButton, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(primeButton, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(toASCIIButton, javax.swing.GroupLayout.PREFERRED_SIZE, 80, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(stepDescriptionPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(modButton, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 80, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(multiplicativeInverseButton, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 80, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(expButton, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 80, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(equalsButton, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 80, javax.swing.GroupLayout.PREFERRED_SIZE))))
                .addContainerGap())
        );
        stepDescriptionPanelLayout.setVerticalGroup(
            stepDescriptionPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(stepDescriptionPanelLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(resultTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(stepDescriptionPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(plusButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGroup(stepDescriptionPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(primeButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(multiplicativeInverseButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(stepDescriptionPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(coprimeButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(modButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(minusButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(stepDescriptionPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(multiplyButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGroup(stepDescriptionPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(toASCIIButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(expButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(stepDescriptionPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(fromASCIIButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(equalsButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(divideButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(22, Short.MAX_VALUE))
        );

        stepOperationLabel.setFont(new java.awt.Font("Ubuntu", 1, 18)); // NOI18N
        stepOperationLabel.setText("p: número primo");

        errorMessageIcon.setIcon(new javax.swing.ImageIcon(getClass().getResource("/ar/uba/fi/rsajapplet/view/error.png"))); // NOI18N
        errorMessageIcon.setToolTipText("este es un mensaje de error");

        javax.swing.GroupLayout stepOperationPanelLayout = new javax.swing.GroupLayout(stepOperationPanel);
        stepOperationPanel.setLayout(stepOperationPanelLayout);
        stepOperationPanelLayout.setHorizontalGroup(
            stepOperationPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, stepOperationPanelLayout.createSequentialGroup()
                .addContainerGap(65, Short.MAX_VALUE)
                .addGroup(stepOperationPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(errorMessageIcon)
                    .addComponent(stepOperationLabel)
                    .addComponent(stepOperationValue, javax.swing.GroupLayout.PREFERRED_SIZE, 255, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(31, 31, 31))
        );
        stepOperationPanelLayout.setVerticalGroup(
            stepOperationPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(stepOperationPanelLayout.createSequentialGroup()
                .addGap(18, 18, 18)
                .addComponent(stepOperationLabel)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(stepOperationValue, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(errorMessageIcon)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        javax.swing.GroupLayout cardsLayout = new javax.swing.GroupLayout(cards);
        cards.setLayout(cardsLayout);
        cardsLayout.setHorizontalGroup(
            cardsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(cardsLayout.createSequentialGroup()
                .addComponent(stepDescriptionPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(stepOperationPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
        );
        cardsLayout.setVerticalGroup(
            cardsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(stepDescriptionPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
            .addComponent(stepOperationPanel, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
        );

        javax.swing.GroupLayout generateKeysTabLayout = new javax.swing.GroupLayout(generateKeysTab);
        generateKeysTab.setLayout(generateKeysTabLayout);
        generateKeysTabLayout.setHorizontalGroup(
            generateKeysTabLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(generateKeysTabLayout.createSequentialGroup()
                .addGap(40, 40, 40)
                .addComponent(modeButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addComponent(startButton, javax.swing.GroupLayout.PREFERRED_SIZE, 110, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(previousButton, javax.swing.GroupLayout.PREFERRED_SIZE, 110, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(nextButton, javax.swing.GroupLayout.PREFERRED_SIZE, 110, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(endButton, javax.swing.GroupLayout.PREFERRED_SIZE, 110, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(52, 52, 52))
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, generateKeysTabLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(lineSeparator)
                .addContainerGap())
            .addGroup(generateKeysTabLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(progressPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addContainerGap())
            .addGroup(generateKeysTabLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(cards, javax.swing.GroupLayout.DEFAULT_SIZE, 830, Short.MAX_VALUE)
                .addContainerGap())
        );
        generateKeysTabLayout.setVerticalGroup(
            generateKeysTabLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(generateKeysTabLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(progressPanel, javax.swing.GroupLayout.PREFERRED_SIZE, 81, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(cards, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(lineSeparator, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(10, 10, 10)
                .addGroup(generateKeysTabLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(modeButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(startButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(previousButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(nextButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(endButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(20, 20, 20))
        );

        tabbedPane.addTab("Generar Claves", generateKeysTab);

        encryptProgressPanel.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Progreso", javax.swing.border.TitledBorder.LEFT, javax.swing.border.TitledBorder.DEFAULT_POSITION));
        encryptProgressPanel.setToolTipText("");

        messageLabel.setFont(new java.awt.Font("Ubuntu", 1, 15)); // NOI18N
        messageLabel.setText("Mensaje:");

        messageValue.setText("3");

        numericalRepresentationLabel.setFont(new java.awt.Font("Ubuntu", 1, 15)); // NOI18N
        numericalRepresentationLabel.setText("Rep Numérica:");

        numericalRepresentationValue.setText("29");

        publicKeyLabel.setFont(new java.awt.Font("Ubuntu", 1, 15)); // NOI18N
        publicKeyLabel.setText("Clave Pública:");

        publicKeyValue.setText("37");

        cryptogramLabel.setFont(new java.awt.Font("Ubuntu", 1, 15)); // NOI18N
        cryptogramLabel.setText("Criptograma:");

        cryptogramValue.setText("5");

        javax.swing.GroupLayout encryptProgressPanelLayout = new javax.swing.GroupLayout(encryptProgressPanel);
        encryptProgressPanel.setLayout(encryptProgressPanelLayout);
        encryptProgressPanelLayout.setHorizontalGroup(
            encryptProgressPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(encryptProgressPanelLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(encryptProgressPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(messageLabel)
                    .addComponent(publicKeyLabel))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(encryptProgressPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(messageValue, javax.swing.GroupLayout.PREFERRED_SIZE, 137, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(publicKeyValue, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(encryptProgressPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(numericalRepresentationLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(cryptogramLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(encryptProgressPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(numericalRepresentationValue, javax.swing.GroupLayout.DEFAULT_SIZE, 260, Short.MAX_VALUE)
                    .addComponent(cryptogramValue, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addContainerGap())
        );
        encryptProgressPanelLayout.setVerticalGroup(
            encryptProgressPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(encryptProgressPanelLayout.createSequentialGroup()
                .addGroup(encryptProgressPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(messageLabel)
                    .addComponent(messageValue)
                    .addComponent(numericalRepresentationLabel)
                    .addComponent(numericalRepresentationValue))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(encryptProgressPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(publicKeyLabel)
                    .addComponent(publicKeyValue)
                    .addComponent(cryptogramLabel)
                    .addComponent(cryptogramValue))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        configurationPanel.setPreferredSize(new java.awt.Dimension(670, 165));

        publicKeyLabel2.setFont(new java.awt.Font("Ubuntu", 1, 18)); // NOI18N
        publicKeyLabel2.setText("Clave Pública:");

        eLabel1.setFont(new java.awt.Font("Ubuntu", 1, 18)); // NOI18N
        eLabel1.setText("e:");

        nLabel1.setFont(new java.awt.Font("Ubuntu", 1, 18)); // NOI18N
        nLabel1.setText("n:");

        nValue1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                nValue1ActionPerformed(evt);
            }
        });

        messageLabel2.setFont(new java.awt.Font("Ubuntu", 1, 18)); // NOI18N
        messageLabel2.setText("Mensaje:");

        useKeyButton1.setText("Usar Clave");

        useMessageButton.setText("Usar Mensaje");

        javax.swing.GroupLayout configurationPanelLayout = new javax.swing.GroupLayout(configurationPanel);
        configurationPanel.setLayout(configurationPanelLayout);
        configurationPanelLayout.setHorizontalGroup(
            configurationPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(configurationPanelLayout.createSequentialGroup()
                .addGap(160, 160, 160)
                .addGroup(configurationPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(messageLabel2)
                    .addGroup(configurationPanelLayout.createSequentialGroup()
                        .addGroup(configurationPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                            .addGroup(configurationPanelLayout.createSequentialGroup()
                                .addGroup(configurationPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(publicKeyLabel2)
                                    .addGroup(configurationPanelLayout.createSequentialGroup()
                                        .addComponent(eLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 24, javax.swing.GroupLayout.PREFERRED_SIZE)
                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                        .addComponent(eValue1, javax.swing.GroupLayout.PREFERRED_SIZE, 105, javax.swing.GroupLayout.PREFERRED_SIZE)))
                                .addGap(18, 18, 18)
                                .addComponent(nLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 24, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(nValue1, javax.swing.GroupLayout.PREFERRED_SIZE, 105, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addComponent(messageValue2))
                        .addGap(26, 26, 26)
                        .addGroup(configurationPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                            .addComponent(useMessageButton, javax.swing.GroupLayout.DEFAULT_SIZE, 132, Short.MAX_VALUE)
                            .addComponent(useKeyButton1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))))
                .addContainerGap(212, Short.MAX_VALUE))
        );
        configurationPanelLayout.setVerticalGroup(
            configurationPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(configurationPanelLayout.createSequentialGroup()
                .addComponent(publicKeyLabel2)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(configurationPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(eLabel1)
                    .addComponent(eValue1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(nLabel1)
                    .addComponent(nValue1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(useKeyButton1))
                .addGap(11, 11, 11)
                .addComponent(messageLabel2)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(configurationPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(messageValue2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(useMessageButton))
                .addGap(0, 36, Short.MAX_VALUE))
        );

        modeButton1.setText("Modo");
        modeButton1.setPreferredSize(new java.awt.Dimension(90, 30));

        startButton1.setText("Inicio");
        startButton1.setPreferredSize(new java.awt.Dimension(100, 30));

        previousButton1.setText("Anterior");
        previousButton1.setPreferredSize(new java.awt.Dimension(100, 30));
        previousButton1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                previousButton1ActionPerformed(evt);
            }
        });

        nextButton1.setText("Siguiente");
        nextButton1.setMaximumSize(new java.awt.Dimension(100, 30));
        nextButton1.setMinimumSize(new java.awt.Dimension(100, 30));
        nextButton1.setPreferredSize(new java.awt.Dimension(100, 30));

        endButton1.setText("Fin");
        endButton1.setMaximumSize(new java.awt.Dimension(90, 30));
        endButton1.setMinimumSize(new java.awt.Dimension(90, 30));
        endButton1.setPreferredSize(new java.awt.Dimension(100, 30));
        endButton1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                endButton1ActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout buttonsPanelLayout = new javax.swing.GroupLayout(buttonsPanel);
        buttonsPanel.setLayout(buttonsPanelLayout);
        buttonsPanelLayout.setHorizontalGroup(
            buttonsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 0, Short.MAX_VALUE)
            .addGroup(buttonsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(buttonsPanelLayout.createSequentialGroup()
                    .addGap(34, 34, 34)
                    .addComponent(modeButton1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(startButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 110, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(previousButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 110, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(nextButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 110, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(endButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 110, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGap(34, 34, 34)))
        );
        buttonsPanelLayout.setVerticalGroup(
            buttonsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 48, Short.MAX_VALUE)
            .addGroup(buttonsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(buttonsPanelLayout.createSequentialGroup()
                    .addGap(6, 6, 6)
                    .addGroup(buttonsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(modeButton1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(startButton1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(previousButton1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(nextButton1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(endButton1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
        );

        javax.swing.GroupLayout encryptTabLayout = new javax.swing.GroupLayout(encryptTab);
        encryptTab.setLayout(encryptTabLayout);
        encryptTabLayout.setHorizontalGroup(
            encryptTabLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(encryptTabLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(encryptTabLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(lineSeparator1, javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(encryptProgressPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(configurationPanel, javax.swing.GroupLayout.DEFAULT_SIZE, 830, Short.MAX_VALUE)
                    .addComponent(buttonsPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addContainerGap())
        );
        encryptTabLayout.setVerticalGroup(
            encryptTabLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(encryptTabLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(encryptProgressPanel, javax.swing.GroupLayout.PREFERRED_SIZE, 81, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(configurationPanel, javax.swing.GroupLayout.DEFAULT_SIZE, 159, Short.MAX_VALUE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(lineSeparator1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(buttonsPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(6, 6, 6))
        );

        tabbedPane.addTab("Encriptar", encryptTab);

        decryptProgressPanel.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Progreso", javax.swing.border.TitledBorder.LEFT, javax.swing.border.TitledBorder.DEFAULT_POSITION));
        decryptProgressPanel.setToolTipText("");

        cLabel.setFont(new java.awt.Font("Ubuntu", 1, 15)); // NOI18N
        cLabel.setText("Criptograma:");

        cValue.setText("3");

        privateKeyLabel.setFont(new java.awt.Font("Ubuntu", 1, 15)); // NOI18N
        privateKeyLabel.setText("Clave Privada:");

        privateKeyValue.setText("29");

        nRLabel.setFont(new java.awt.Font("Ubuntu", 1, 15)); // NOI18N
        nRLabel.setText("Rep Numérica:");

        nRValue.setText("37");

        mLabel.setFont(new java.awt.Font("Ubuntu", 1, 15)); // NOI18N
        mLabel.setText("Mensaje:");

        mValue.setText("5");

        javax.swing.GroupLayout decryptProgressPanelLayout = new javax.swing.GroupLayout(decryptProgressPanel);
        decryptProgressPanel.setLayout(decryptProgressPanelLayout);
        decryptProgressPanelLayout.setHorizontalGroup(
            decryptProgressPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(decryptProgressPanelLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(decryptProgressPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(cLabel)
                    .addComponent(nRLabel))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(decryptProgressPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(cValue, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(nRValue, javax.swing.GroupLayout.DEFAULT_SIZE, 379, Short.MAX_VALUE))
                .addGap(18, 18, 18)
                .addGroup(decryptProgressPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(privateKeyLabel)
                    .addComponent(mLabel))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(decryptProgressPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(privateKeyValue, javax.swing.GroupLayout.DEFAULT_SIZE, 172, Short.MAX_VALUE)
                    .addComponent(mValue, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addContainerGap())
        );
        decryptProgressPanelLayout.setVerticalGroup(
            decryptProgressPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(decryptProgressPanelLayout.createSequentialGroup()
                .addGroup(decryptProgressPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(cLabel)
                    .addComponent(cValue)
                    .addComponent(privateKeyLabel)
                    .addComponent(privateKeyValue))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(decryptProgressPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(nRLabel)
                    .addComponent(nRValue)
                    .addComponent(mLabel)
                    .addComponent(mValue))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        javax.swing.GroupLayout decryptTabLayout = new javax.swing.GroupLayout(decryptTab);
        decryptTab.setLayout(decryptTabLayout);
        decryptTabLayout.setHorizontalGroup(
            decryptTabLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(decryptTabLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(decryptProgressPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addContainerGap())
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, decryptTabLayout.createSequentialGroup()
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 166, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(298, 298, 298))
        );
        decryptTabLayout.setVerticalGroup(
            decryptTabLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(decryptTabLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(decryptProgressPanel, javax.swing.GroupLayout.PREFERRED_SIZE, 81, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(18, 18, 18)
                .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 100, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(125, Short.MAX_VALUE))
        );

        tabbedPane.addTab("Desencriptar", decryptTab);

        encryptProgressPanel1.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Progreso", javax.swing.border.TitledBorder.LEFT, javax.swing.border.TitledBorder.DEFAULT_POSITION));
        encryptProgressPanel1.setToolTipText("");

        messageLabel1.setFont(new java.awt.Font("Ubuntu", 1, 15)); // NOI18N
        messageLabel1.setText("Mensaje:");

        messageValue1.setText("3");

        numericalRepresentationLabel1.setFont(new java.awt.Font("Ubuntu", 1, 15)); // NOI18N
        numericalRepresentationLabel1.setText("Rep Numérica:");

        numericalRepresentationValue1.setText("29");

        publicKeyLabel1.setFont(new java.awt.Font("Ubuntu", 1, 15)); // NOI18N
        publicKeyLabel1.setText("Clave Pública:");

        publicKeyValue1.setText("37");

        cryptogramLabel1.setFont(new java.awt.Font("Ubuntu", 1, 15)); // NOI18N
        cryptogramLabel1.setText("Criptograma:");

        cryptogramValue1.setText("5");

        javax.swing.GroupLayout encryptProgressPanel1Layout = new javax.swing.GroupLayout(encryptProgressPanel1);
        encryptProgressPanel1.setLayout(encryptProgressPanel1Layout);
        encryptProgressPanel1Layout.setHorizontalGroup(
            encryptProgressPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(encryptProgressPanel1Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(encryptProgressPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(messageLabel1)
                    .addComponent(publicKeyLabel1))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(encryptProgressPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(messageValue1, javax.swing.GroupLayout.PREFERRED_SIZE, 137, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(publicKeyValue1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(encryptProgressPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(numericalRepresentationLabel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(cryptogramLabel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(encryptProgressPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(numericalRepresentationValue1, javax.swing.GroupLayout.DEFAULT_SIZE, 260, Short.MAX_VALUE)
                    .addComponent(cryptogramValue1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addContainerGap())
        );
        encryptProgressPanel1Layout.setVerticalGroup(
            encryptProgressPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(encryptProgressPanel1Layout.createSequentialGroup()
                .addGroup(encryptProgressPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(messageLabel1)
                    .addComponent(messageValue1)
                    .addComponent(numericalRepresentationLabel1)
                    .addComponent(numericalRepresentationValue1))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(encryptProgressPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(publicKeyLabel1)
                    .addComponent(publicKeyValue1)
                    .addComponent(cryptogramLabel1)
                    .addComponent(cryptogramValue1))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        tabbedPane.addTab("tab4", encryptProgressPanel1);
        tabbedPane.addTab("tab5", jTabbedPane2);

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
        this.setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(titlePanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(tabbedPane)
                .addContainerGap())
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(titlePanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(tabbedPane, javax.swing.GroupLayout.PREFERRED_SIZE, 373, javax.swing.GroupLayout.PREFERRED_SIZE))
        );
    }// </editor-fold>//GEN-END:initComponents

    private void endButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_endButtonActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_endButtonActionPerformed

    private void previousButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_previousButtonActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_previousButtonActionPerformed

    private void previousButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_previousButton1ActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_previousButton1ActionPerformed

    private void endButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_endButton1ActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_endButton1ActionPerformed

    private void nValue1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_nValue1ActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_nValue1ActionPerformed


    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JPanel buttonsPanel;
    private javax.swing.JLabel cLabel;
    private javax.swing.JLabel cValue;
    private javax.swing.JPanel cards;
    private javax.swing.JPanel configurationPanel;
    private javax.swing.JButton coprimeButton;
    private javax.swing.JLabel cryptogramLabel;
    private javax.swing.JLabel cryptogramLabel1;
    private javax.swing.JLabel cryptogramValue;
    private javax.swing.JLabel cryptogramValue1;
    private javax.swing.JLabel dLabel;
    private javax.swing.JLabel dValue;
    private javax.swing.JPanel decryptProgressPanel;
    private javax.swing.JPanel decryptTab;
    private javax.swing.JButton divideButton;
    private javax.swing.JLabel eLabel;
    private javax.swing.JLabel eLabel1;
    private javax.swing.JLabel eValue;
    private javax.swing.JTextField eValue1;
    private javax.swing.JPanel encryptProgressPanel;
    private javax.swing.JPanel encryptProgressPanel1;
    private javax.swing.JPanel encryptTab;
    private javax.swing.JButton endButton;
    private javax.swing.JButton endButton1;
    private javax.swing.JButton equalsButton;
    private javax.swing.JLabel errorMessageIcon;
    private javax.swing.JButton expButton;
    private javax.swing.JButton fromASCIIButton;
    private javax.swing.JPanel generateKeysTab;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JTabbedPane jTabbedPane1;
    private javax.swing.JTabbedPane jTabbedPane2;
    private javax.swing.JSeparator lineSeparator;
    private javax.swing.JSeparator lineSeparator1;
    private javax.swing.JLabel mLabel;
    private javax.swing.JLabel mValue;
    private javax.swing.JLabel messageLabel;
    private javax.swing.JLabel messageLabel1;
    private javax.swing.JLabel messageLabel2;
    private javax.swing.JLabel messageValue;
    private javax.swing.JLabel messageValue1;
    private javax.swing.JTextField messageValue2;
    private javax.swing.JButton minusButton;
    private javax.swing.JButton modButton;
    private javax.swing.JButton modeButton;
    private javax.swing.JButton modeButton1;
    private javax.swing.JButton multiplicativeInverseButton;
    private javax.swing.JButton multiplyButton;
    private javax.swing.JLabel nLabel;
    private javax.swing.JLabel nLabel1;
    private javax.swing.JLabel nRLabel;
    private javax.swing.JLabel nRValue;
    private javax.swing.JLabel nValue;
    private javax.swing.JTextField nValue1;
    private javax.swing.JButton nextButton;
    private javax.swing.JButton nextButton1;
    private javax.swing.JLabel numericalRepresentationLabel;
    private javax.swing.JLabel numericalRepresentationLabel1;
    private javax.swing.JLabel numericalRepresentationValue;
    private javax.swing.JLabel numericalRepresentationValue1;
    private javax.swing.JLabel pLabel;
    private javax.swing.JLabel pValue;
    private javax.swing.JLabel phiLabel;
    private javax.swing.JLabel phiValue;
    private javax.swing.JButton plusButton;
    private javax.swing.JButton previousButton;
    private javax.swing.JButton previousButton1;
    private javax.swing.JButton primeButton;
    private javax.swing.JLabel privateKeyLabel;
    private javax.swing.JLabel privateKeyValue;
    private javax.swing.JPanel progressPanel;
    private javax.swing.JLabel publicKeyLabel;
    private javax.swing.JLabel publicKeyLabel1;
    private javax.swing.JLabel publicKeyLabel2;
    private javax.swing.JLabel publicKeyValue;
    private javax.swing.JLabel publicKeyValue1;
    private javax.swing.JLabel qLabel;
    private javax.swing.JLabel qValue;
    private javax.swing.JTextField resultTextField;
    private javax.swing.JButton startButton;
    private javax.swing.JButton startButton1;
    private javax.swing.JPanel stepDescriptionPanel;
    private javax.swing.JLabel stepOperationLabel;
    private javax.swing.JPanel stepOperationPanel;
    private javax.swing.JTextField stepOperationValue;
    private javax.swing.JTabbedPane tabbedPane;
    private javax.swing.JLabel titleLabel;
    private javax.swing.JPanel titlePanel;
    private javax.swing.JButton toASCIIButton;
    private javax.swing.JButton useKeyButton1;
    private javax.swing.JButton useMessageButton;
    // End of variables declaration//GEN-END:variables
}
